package com.example.basic.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * ClassName: customException
 * Description:
 * date: 2021/12/14 9:50
 * author zesion lee
 */

@AllArgsConstructor
@Getter
public class MyCustomException extends RuntimeException {

    private final Integer code;
    private final String msg;

    public MyCustomException(ExceptionEnum ex) {
        this(ex.getCode(), ex.getMsg());
    }
}
